package com.zxt.recruit.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName sys_user_access_key
 */
@TableName(value ="sys_user_access_key")
@Data
public class SysUserAccessKey implements Serializable {
    /**
     * oauth_key
     */
    @TableId
    private String accessKeyId;

    /**
     * 名称
     */
    private String name;

    /**
     * 用户fk
     */
    private String userFk;

    /**
     * 插入时间
     */
    private LocalDateTime inputTime;

    /**
     * 是否删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysUserAccessKey other = (SysUserAccessKey) that;
        return (this.getAccessKeyId() == null ? other.getAccessKeyId() == null : this.getAccessKeyId().equals(other.getAccessKeyId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getUserFk() == null ? other.getUserFk() == null : this.getUserFk().equals(other.getUserFk()))
            && (this.getInputTime() == null ? other.getInputTime() == null : this.getInputTime().equals(other.getInputTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAccessKeyId() == null) ? 0 : getAccessKeyId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getUserFk() == null) ? 0 : getUserFk().hashCode());
        result = prime * result + ((getInputTime() == null) ? 0 : getInputTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", accessKeyId=").append(accessKeyId);
        sb.append(", name=").append(name);
        sb.append(", userFk=").append(userFk);
        sb.append(", inputTime=").append(inputTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}